CERNBox Support

You can interact with your CERNBox storage via the commandline.

To get started open a new terminal. Authentication is handled via kerberos, so the first thing to do is to obtain a kerberos token with:

kinit <your_cern_usern_name>@CERN.CH

Exploring your CERNBox

After this you can start the commandline interface for CERNBox with the command cb. Once you have started it type help to get an overview of the available commands. To leave type exit. The files you see from the CERNbox web interface are located at: /eos/user/<initial>/<username>. To list the contents of your CERNBox type: ls eos/user/<initial>/<username> after starting the cb commandline application. Under the hood cb is just an alias for xrdfs.

Copying files

You can copy or retrieve files to and from CERNBox. For this you will have to use the xrdcopy program. For individual files we provide two convenience scripts: cb-put.sh and cb-get.sh. They will put or get a file from your CERNBox. For more complicated things like storing a whole directory we recommend you familiarise yourself with xrdcopy which is excellent.

To get a file from your CERNBox:

cb-get.sh <source> <destination>

and to store a file on your CERNBox:

cb-put.sh <source> <destination>

These two scripts only work with individual files and not direcotries. For those please checkout

Saving everything to CERNBox

You can save the state (with all the modifications you made) of the repository which was used to start this everware instance to your CERNbox by running

save-to-cernbox.sh

This will create a direcotry named everware-DATE-TIME in your CERNBox with all files in the ~/analysis directory.

Cats!

Who does not have cat images on their CERNBox? To fetch a single file called cat.png from your CERNBox:


In [ ]:
!cb-get.sh cat.png cat.png

In [ ]:
from IPython.display import Image

In [ ]:
Image("cat.png")

Storing it all

To store the state of the container on CERNBox:


In [ ]:
!save-to-cernbox.sh